import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: GaoBo
 * Date: 2021-04-09
 * Time: 18:18
 */
public class HomeWork {


    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextInt()) {
            int n = scan.nextInt();
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    if(i == j) {
                        System.out.print("*");
                    }else if(i == n-1-j) {
                        System.out.print("*");
                    }else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }
        }
    }


    public static void main15(String[] args) {
        int n = 7;
        for (int i = 30; i >= 0 ; i = i-2) {
            System.out.print(((n >>> i) & 1) + " ");
        }
        System.out.println();
        for (int i = 31; i >= 1 ; i = i-2) {
            System.out.print(((n >>> i) & 1) + " ");
        }
        int a  =10;
        a = a+20;
        System.out.println(a+20);
    }

    public static void main14(String[] args) {
        int count = 0;
        int n = -1;// 0000 1011
        while (n != 0) {
            count++;//1
            n = n&(n-1);
        }
        System.out.println(count);
    }


    public static void main13(String[] args) {
        int count = 0;
        int n = 11;// 0000 1011
        while (n != 0) {
            if( (n & 1) != 0) {
                count++;
            }
            n = n>>>1;//无符号右移   -1
        }
        System.out.println(count);
    }


    public static void main12(String[] args) {
        int n = 123;
        while (n != 0) {
            System.out.println(n % 10);
            n /= 10;
        }
    }

    public static void main11(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int count = 3;

        while (count != 0) {
            System.out.println("请输入你的密码：");
            String password = scanner.nextLine();
            //if(password == "123") {
            if(password.equals("123")) {
                System.out.println("登录成功！");
                break;
            }else {
                count--;
                System.out.println("你还有"+count+" 次机会！");
            }
        }
    }


    public static void main10(String[] args) {
        for (int i = 0; i < 999999; i++) {
            //1、求位数
            int count = 0;
            int tmp = i;//123
            while (tmp != 0) {
                count++;//1  2    3
                tmp /= 10;//12   1  0
            }
            //count = 3; 但是 tmp 的值等于0
            tmp = i;//123
            int sum = 0;
            //2、求tmp的每一位
            while (tmp != 0) {
                sum += Math.pow(tmp%10,count);
                tmp /= 10;//12   1  0
            }
            if(sum == i) {
                System.out.println("这就是我想要的数字："+i);
            }
        }
    }


    public static void main9(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100 ; i++) {
            if(i % 10 == 9) {
                count++;
            } else if(i / 10 == 9) {
                count++;
            }
        }
        System.out.println(count);
    }


    public static void main8(String[] args) {
        double sum = 0.0;
        int flg = 1;
        for (int i = 1; i <= 100; i++) {
            sum += 1.0/i * flg;
            flg = -flg;
        }
        System.out.println(sum);
    }


    public static void main7(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();//18
        int b = scanner.nextInt();//12

        while (a % b != 0) {
            int c = a%b;//6
            a = b;//12
            b = c;//6
        }
        System.out.println(b);
    }


    public static void main6(String[] args) {
        for (int i = 1; i <= 9 ; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(j+"*"+i+"="+i*j+" ");
            }
            System.out.println();
        }
    }


    /**
     * 16      a*b    1*16  2*8   4*4    肯定有1个数字小于等于 16/2=   8
     * 16      a*b    1*16  2*8   4*4    肯定有1个数字小于等于 根号16   4
     * @param args
     */

    public static void main5(String[] args) {
        /*Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();*/
        for (int j = 1; j <= 100; j++) {

            int i = 2;
            for ( ;i <= Math.sqrt(j); i++) {//Math.sqrt(n)  -->根号n
                if(j % i == 0) {
                    //说明n 可以整除2到n-1的某个数字  那么就不是素数
                    System.out.println(j+" 不是素数！");
                    break;
                }
            }
            //代码有2种情况：
            //1、i >= n     2、遇到break
            if(i > Math.sqrt(j)) {
                System.out.println(j+" 是素数！");
            }

        }

    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 2;
        for ( ;i <= n/2; i++) {
            if(n % i == 0) {
                //说明n 可以整除2到n-1的某个数字  那么就不是素数
                System.out.println(n+" 不是素数！");
                break;
            }
        }
        //代码有2种情况：
        //1、i >= n     2、遇到break
        if(i > n/2) {
            System.out.println(n+" 是素数！");
        }
    }

    public static void main3(String[] args) {
        int n = 1;
        if(n == 1) {
            System.out.println("1不是素数！");
            return;
        }
        int i = 2;
        for ( ;i < n; i++) {
            if(n % i == 0) {
                //说明n 可以整除2到n-1的某个数字  那么就不是素数
                System.out.println(n+" 不是素数！");
                break;
            }/*else {
                System.out.println("是素数！！");
            }*/
        }
        //代码有2种情况：
        //1、i >= n     2、遇到break
        if(i >= n) {
            System.out.println(n+" 是素数！");
        }
    }

    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int age = scanner.nextInt();
        if(age <= 18) {
            System.out.println("少年！");
        }else if(age >= 19 && age <= 28) {//19<=age<=28
            System.out.println("青年！");
        }else if(age >= 29 && age <= 55) {
            System.out.println("中年！");
        }else {
            System.out.println("老年！");
        }
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random(123);//伪随机
        int rand = random.nextInt(100) + 1;//[1-101)
        while (true) {
            System.out.println("请输入你要猜的数字：");
            int n = scanner.nextInt();//用户输入：
            if(n > rand) {
                System.out.println("猜大了！");
            }else if(n == rand) {
                System.out.println("猜对了！");
                break;
            }else {
                System.out.println("猜小了！");
            }
        }
    }
}
